package com.ruoyi.basedata.api;

import com.ruoyi.basedata.api.factory.RemoteCustomerFallBackFactory;
import com.ruoyi.basedata.api.factory.RemoteGoodsFallbackFactory;
import com.ruoyi.basedata.domain.CustomerUtil;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.basedata.Customer;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author 罗梦杰
 * date 2024/11/15 9:38
 * @version 1.0
 */
@FeignClient(contextId = "RemoteCustomerService", value = ServiceNameConstants.BASEDATA_SERVICE,fallbackFactory = RemoteCustomerFallBackFactory.class)
public interface RemoteCustomerService {
    @PostMapping("/customer/selectCustomerByName")
    R<CustomerUtil> selectCustomerByName(@RequestBody String name, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
